Intraoperative pairing of cortical and spinal stimulation